home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / bench / x.txt / 000075_fdc@watsun.cc.columbia.edu_Fri Oct 26 09:55:43 EDT 2001.msg < prev    next >
Text File  |  2020-01-01  |  2KB  |  61 lines

  1. Article: 12888 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
  3. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.sys.hp.hpux,comp.protocols.kermit.misc
  5. Subject: Re: rm files older than 14 days
  6. Date: 26 Oct 2001 13:51:22 GMT
  7. Organization: Columbia University
  8. Lines: 44
  9. Message-ID: <9rbpoq$ral$1@newsmaster.cc.columbia.edu>
  10. References: <3bd91c1e$1@netnews.web.de>
  11. NNTP-Posting-Host: watsun.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1004104282 27989 128.59.39.2 (26 Oct 2001 13:51:22 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 26 Oct 2001 13:51:22 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.sys.hp.hpux:142454 comp.protocols.kermit.misc:12888
  16.  
  17. In article <3bd91c1e$1@netnews.web.de>,
  18. Christian Hartmann  <christian.hartmann@sheego.com> wrote:
  19. : I am looking for the command to remove files in a given directory which
  20. : are older than 14 days.  I've got the following command, which is running
  21. : under linux, but unfortunately not under hp-ux.
  22. :  find /<directory_to_seek_in>/ -type -f -mtime +14 -print0 | xargs 0r- n 
  23. :  $(getconf ARG_MAX) -P0 rn -fv
  24. :
  25. The next release of C-Kermit, 8.0:
  26.  
  27.   http://www.columbia.edu/kermit/ck80.html
  28.  
  29. would let you do it like this:
  30.  
  31.   delete /before:-14days *
  32.  
  33. or:
  34.  
  35.   delete /before:-2weeks *
  36.  
  37. where "*" applies to the current directory.  You might find this more
  38. intuitive than the many permutations of find, xargs, and their options.
  39.  
  40. If you wanted the file specification to apply recursively, then:
  41.  
  42.   delete /before:-2weeks /recursive *
  43.  
  44. And if you wanted to add exception lists, size qualifiers, etc, you could do
  45. that too:
  46.  
  47.  C-Kermit>del ? File specification; or switch, one of the following:
  48.   /after:         /except:        /nodotfiles     /not-before:    /summary
  49.   /ask            /heading        /noheading      /page           /tree
  50.   /before:        /larger-than:   /nolist         /recursive      /type:
  51.   /directories    /list           /nopage         /simulate
  52.   /dotfiles       /noask          /not-after:     /smaller-than:
  53.  C-Kermit>del
  54.  
  55. Since C-Kermit is part of HP-UX, presumably it will be updated by HP
  56. when the new version is released.  If not, you can get it from Columbia
  57. for all HP-UX version from 5 to 11.
  58.  
  59. - Frank
  60.